Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Registering a Custom Drawing Engine

QuickDraw 3D RAVE provides functions that you can use to register a custom drawing engine and its drawing methods.

QARegisterEngine

You can use the QARegisterEngine function to register a custom drawing engine with QuickDraw 3D RAVE.

TQAError QARegisterEngine (TQAEngineGetMethod engineGetMethod);
engineGetMethod
The method retrieval method of your drawing engine. See "Method Reporting Methods" for a complete description of this method.

DESCRIPTION

The QARegisterEngine function registers your custom drawing engine with QuickDraw 3D RAVE. You should call this function at startup time (usually from the initialization routine in the shared library containing the code for your drawing engine). QuickDraw 3D RAVE uses the method specified by the engineGetMethod parameter to retrieve function pointers for the non-drawing methods defined in your drawing engine.

SPECIAL CONSIDERATIONS

You should call QARegisterEngine only to register a custom drawing engine. Applications using QuickDraw 3D RAVE to draw into one or more draw contexts do not need to use this function.

QARegisterDrawMethod

You can use the QARegisterDrawMethod function to register a public draw context method with QuickDraw 3D RAVE.

TQAError QARegisterDrawMethod (
                     TQADrawContext *drawContext,
                     TQADrawMethodTag methodTag,
                     TQADrawMethod method);
drawContext
A draw context.
methodTag
A selector that determines which draw context method is to be registered for the specified draw context. See "Public Draw Context Method Selectors" for complete information about the available method selectors.
method
A pointer to the draw context method of the specified type.

DESCRIPTION

The QARegisterDrawMethod function changes the method pointer of the draw context specified by the drawContext parameter that has the type specified by the methodTag parameter to the method specified by the method parameter. You should call QARegisterDrawMethod instead of directly changing the fields of a draw context structure.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |